<template>

    <van-nav-bar title="购物车" />


    <van-swipe-cell>
        <van-card num="2" price="2.00" desc="描述信息" title="商品标题" class="goods-card"
            thumb="https://ts3.tc.mm.bing.net/th?id=ORMS.dc3efc974b90b0c1157284bfeb107885&pid=Wdp&w=268&h=140&qlt=90&c=1&rs=1&dpr=1.5&p=0" />
        <template #right>
            <van-button square text="删除" type="danger" class="delete-button" style="height: 100%;"/>
        </template>
    </van-swipe-cell>
   
        <van-swipe-cell>
        <van-card num="2" price="2.00" desc="描述信息" title="商品标题" class="goods-card"
            thumb="https://ts3.tc.mm.bing.net/th?id=ORMS.0b76fe92ddc233420c26cf13320639a0&pid=Wdp&w=268&h=140&qlt=90&c=1&rs=1&dpr=1.5&p=0" />
        <template #right>
            <van-button square text="删除" type="danger" class="delete-button" style="height: 100%;"/>
        </template>
    </van-swipe-cell>

    <van-submit-bar :price="6040" button-text="立即支付" @submit="onSubmit">
        <van-checkbox v-model="checked">选择</van-checkbox>
    </van-submit-bar>
</template>

<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
const router = useRouter()
let checked = ref()
import { detailApi } from '@/api/api'
import { useRoute } from 'vue-router';
const route =useRoute()
const detailApiData = ref([])
detailApi(route.params.goods_id).then(res => {
    console.log('购物车的数据', res);
    detailApiData.value=res.data.message
})
const onSubmit = () => {
    router.push('/zf')
}
</script>

<style lang="scss" scoped></style>